#pragma once

//#ifndef __BSLIB_H__
#include "../../JMX_Library/bslib/bslib.h"

	#ifdef _DEBUG
	#	pragma comment( lib, "bslibd.lib")
	#else
	#	pragma comment( lib, "bslib.lib")
	#endif

//#endif

#include "../../JMX_Library/bslib/thread/bsthread.h"
#include "../../JMX_Library/bslib/netengine/interface.h"

extern IBSNet* g_pNetEngine;

#define START_NAMESPACE
#define END_NAMESPACE
#define _SMC

#include "MassiveMsg.h"
#include "SMInterface.h"

#ifdef _DEBUG
#	pragma comment( lib, "Frameworkd.lib")
#else
#	pragma comment( lib, "Framework.lib")
#endif

#define RECT_WIDTH( rc) (rc.right - rc.left)
#define RECT_HEIGHT( rc) (rc.bottom - rc.top)

#define RECT_CENTER_X(rc) ((rc.right + rc.left) / 2)
#define RECT_CENTER_Y(rc) ((rc.bottom + rc.top) / 2)

#define MAKERECT_BY_CENTER_SIZE( rc, center, size)	\
		rc.left = center.x - size.cx / 2;\
		rc.top = center.y - size.cy / 2;\
		rc.right = rc.left + size.cx;\
		rc.bottom = rc.top + size.cy;

extern ISMServerArchitecture*	g_pServerArchitecture;
extern LogFN					g_pLogFN;
extern ISMNet*					g_pSMNet;
extern void ReportLog(DWORD LogType,LPCTSTR format,...);
extern void AsyncPumpMessage();
extern sSMCInfo*				g_pSMCInfo;

#define REG_MSG_HANDLE( classname, msgid) m_MsgHandle[ msgid] = (MSG_HANDLE)&classname::On##msgid
#define REG_MSG_HANDLE2( classname, msgid, handle) m_MsgHandle[ msgid] = (MSG_HANDLE)&classname::handle

#define _NOT_USE_3D

//#include "JOB_DEFINE.h"

//#include "../../JMX_Library/GFX/GFXMainFrame/GFXFrame.h"
#include "../../Include/CPRJ_GLOBAL_DEF.h"
//#include "GFXSMCFileManager.h"

//#include "../../Servers/ServerCommon/CPRJ_SERVER_DEF.h"
//#include "TempFunctions.h"
//#include "../../JMX_Library/objengine/ObjEngine.h"
//#include "../../Client/CPRJ_CLIENT_DEF.h"

//#include "../../ReferenceData/ReferenceData.h"
//#include "../../ReferenceData/ReferenceData_Client.h"
//#include "../../Client/RefDataManager.h"

extern sSMCInfo				g_SMCInfo;
//extern CGFXSMCFileManager	g_GFXSMCFileManager;